**1.Descriptive statistics of primary variables
use original_data.dta, clear
**This paper only examines the pollution reduction effect of low-carbon pilot policies at the city level, and does not take pilot provinces as the experimental group, so the samples of enterprises in pilot provinces are deleted.The following is the deletion process of data in some provinces
drop if(city_code==4402)
drop if(city_code==4404|city_code==4405)
drop if(city_code==4406|city_code==4407|city_code==4408|city_code==4409)
drop if(city_code==4412|city_code==4413|city_code==4414|city_code==4415)
drop if(city_code==4416|city_code==4417|city_code==4418|city_code==4419)
drop if(city_code==4420|city_code==4451|city_code==4452|city_code==4453)
drop if(city_code==2101|city_code==2102|city_code==2103|city_code==2104)
drop if(city_code==2105|city_code==2106|city_code==2107|city_code==2108)
drop if(city_code==2109|city_code==2110|city_code==2111)
drop if(city_code==2112|city_code==2113|city_code==2114)
drop if(city_code==4201|city_code==4202|city_code==4203|city_code==4205)
drop if(city_code==4206|city_code==4207|city_code==4208)
drop if(city_code==4209|city_code==4210|city_code==4211|city_code==4212)
drop if(city_code==4213|city_code==4228|city_code==4290)
drop if(city_code==6101|city_code==6102|city_code==6103|city_code==6104)
drop if(city_code==6105|city_code==6107|city_code==6108)
drop if(city_code==6109|city_code==6110)
drop if (city_code==5303|city_code==5304|city_code==5305)
drop if(city_code==5306|city_code==5307|city_code==5308|city_code==5309)
drop if(city_code==5323|city_code==5325|city_code==5326|city_code==5329)
drop if(city_code==5333|city_code==5334)
drop if(city_code==5328|city_code==5331)
drop if(city_code==4601|city_code==4602|city_code==4604|city_code==4690|city_code==4600|city_code==4691|city_code==4692)
gen LCCP2010=0  
replace LCCP2010=1 if(city_code==1201|city_code==1202|city_code==5001|city_code==5002|city_code==5003|city_code==4403|city_code==3502)
replace LCCP2010=1 if(city_code==3301|city_code==3601|city_code==5201|city_code==1306)  
gen LCCP2012=0  	  
replace LCCP2012=1 if(city_code==1101|city_code==1102|city_code==3101|city_code==3102|city_code==1301|city_code==1303)
replace LCCP2012=1 if(city_code==1405|city_code==1507|city_code==2202|city_code==2327)
replace LCCP2012=1 if(city_code==3205|city_code==3208|city_code==3211|city_code==3302)
replace LCCP2012=1 if(city_code==3303|city_code==3417|city_code==3507|city_code==3602)
replace LCCP2012=1 if(city_code==3607|city_code==3702|city_code==4190|city_code==4201)
replace LCCP2012=1 if(city_code==4401|city_code==4503|city_code==5108|city_code==5203)
replace LCCP2012=1 if(city_code==5301|city_code==6106|city_code==6203|city_code==6501)	
rename LCCP2010 reform2010
rename LCCP2012 reform2012
gen post2010=0
replace post2010=1 if year>=2010
gen post2012=0
replace post2012=1 if year>=2012
destring group,replace force
xtset year group
drop if total_asset<=0
drop if total_asset==.
gen lnSize=ln(total_asset+1)
drop if total_liab<=0
drop if total_liab==.
drop if tot_fixedasset==.
drop if tot_fixedasset<=0
gen lnAge=(year-year_establish)
drop if lnAge==.
drop if lnAge>=70
drop if lnAge<0
gen Assdebt=total_liab/total_asset
gen Fixasst=tot_fixedasset/total_asset 
replace total_employ=average_employ if total_employ==.
replace total_employ=total_employe if total_employ==.
gen lnKl=ln(tot_fixedasse/total_employ+1)
drop if lnKl==.
drop if total_asset<current_assets
drop if total_asset< tot_fixedasset
drop if total_employ<8
drop if gdptrend==.
drop if fditrend==.
drop if fintrend==.
drop if indtrend==.
drop if COD==.
drop if COD==0
drop if SO2==.
drop if SO2==0
gen lnSO2=ln(SO2+1)
drop if lnSO2==.
gen lnCOD=ln(COD+1)
save data1.dta

use data1.dta
drop if reform2012==1 & year>=2012
gen post=0
replace post=1 if(post2010==1)
gen reform=0
replace reform=1 if(reform2010==1)
gen LCCP=post*reform
save data.dta
**Description of the main variables
use data.dta, clear
sum lnSO2 lnCOD LCCP lnAge lnSize Assdebt Fixasst lnKl gdptrend fditrend fintrend indtrend
**2.Benchmark test results Table 1 
reghdfe lnSO2 LCCP,absorb(year group) vce(clu group)
est store m11
reghdfe lnSO2 LCCP lnAge lnSize Assdebt Fixasst lnKl gdptrend fditrend fintrend indtrend,absorb(year group) vce(clu group)
est store m12
reghdfe lnCOD LCCP,absorb(year group) vce(clu group)
est store m13
reghdfe lnCOD LCCP lnAge lnSize Assdebt Fixasst lnKl gdptrend fditrend fintrend indtrend,absorb(year group) vce(clu group)
est store m14
esttab m11 m12 m13 m14 using H1.rtf, ar2(%6.4f) compress nogaps replace star(* 0.1 ** 0.05 *** 0.01) b(%6.4f) se(%6.4f)
**All data analysis below is based on data.dta
**3.Parallel trend test Fig. 1
///Parallel trend test of SO2
use data.dta, clear
replace reform2010=2010 if reform2010==1
gen birth_year=0 if reform2010==0
replace birth_year=2010 if reform2010==2010
replace birth_year=. if birth_year==0
destring group,replace force
xtset year group
gen event_time=year- birth_year
tab event_time
replace event_time=-3 if event_time<-3
gen t=1.96
forvalues i=3(-1)1{
gen d_`i'=(event==-`i')
	   }
gen current=(event==0)
forvalues i=1(1)4{  
gen d`i'=(event==`i')
	   }
drop d_1
rename current d_1
reghdfe lnSO2 d_3 d_2 d_1 d1 d2 d3 d4 lnAge lnSize Assdebt Fixasst lnKl gdptrend fditrend fintrend indtrend,absorb(year group) vce(clu group)
forvalues i=1/3 { 
gen b_`i'=_b[d_`i']
gen se_b_`i'= _se[d_`i']
gen b_`i'LB=b_`i'- t*se_b_`i'
gen b_`i'UB=b_`i'+ t*se_b_`i'
}
forvalues i=1/4{ 
gen b`i' =_b[d`i'] 
gen se_b`i' =_se[d`i']
gen b`i'LB=b`i' - t*se_b`i'
gen b`i'UB=b`i' + t*se_b`i'
}
gen b =.
gen LB =.
gen UB =.
rename event_time distance
forvalues i=1/3{
replace b=b_`i' if distance==-`i'
}
forvalues i=1/4{
replace b=b`i' if distance==`i'
}
forvalues i=1/3{
replace LB=b_`i'LB if distance==-`i'
}
forvalues i=1/4{
replace LB=b`i'LB if distance==`i'
}
forvalues i=1/3{
replace UB=b_`i'UB if distance==-`i'
}
forvalues i=1/4{
replace UB=b`i'UB if distance==`i'
}
keep distance b LB UB
duplicates drop distance,force
sort distance
replace b=-0.05749517 in 4
replace LB=-0.12878026 in 4
replace UB=0.01378993 in 4
replace b=0 in 3
replace LB=0 in 3
replace UB=0 in 3
twoway (connected b distance, sort lcolor(black) mcolor(black) msymbol(o) cmissing(n))(rcap LB UB distance, lcolor(black)lpattern(dash) msize(medium)),ytitle(Coefficient of regression) ytitle(, size(medium))  yline(0, lwidth(vthin) lpattern(dash) lcolor(teal)) ylabel(, labsize(small) angle(horizontal) nogrid) xtitle(Relative time point) xtitle(, size(medium)) xline(0, lwidth(vthin) lpattern(dash) lcolor(teal)) xlabel(-3(1)4, labsize(small))  xmtick(-3(1)4, nolabels ticks)legend(off)graphregion(fcolor(white) lcolor(white) ifcolor(white) ilcolor(white))
///Parallel trend test of COD
use data.dta, clear
replace reform2010=2010 if reform2010==1
gen birth_year=0 if reform2010==0
replace birth_year=2010 if reform2010==2010
replace birth_year=. if birth_year==0
destring group,replace force
xtset year group
gen event_time=year-birth_year
tab event_time
replace event_time=-3 if event_time<-3
gen t =1.96
forvalues i=3(-1)1{
gen d_`i'=(event==-`i')
	   }
gen current= (event==0)
forvalues i=1(1)4{  
gen d`i'=(event==`i')
	   }
drop d_1
rename current d_1
reghdfe lnCOD d_3 d_2 d_1 d1 d2 d3 d4 lnAge lnSize Assdebt Fixasst lnKl gdptrend fditrend fintrend indtrend,absorb(year group) vce(clu group)
forvalues i=1/3{ 
gen b_`i'=_b[d_`i']
gen se_b_`i'=_se[d_`i']
gen b_`i'LB=b_`i' - t * se_b_`i'
gen b_`i'UB=b_`i' + t * se_b_`i'
}
forvalues i=1/4 { 
gen b`i'=_b[d`i'] 
gen se_b`i'=_se[d`i']
gen b`i'LB=b`i' - t * se_b`i'
gen b`i'UB=b`i' + t * se_b`i'
}
gen b =.
gen LB =.
gen UB =.
rename event_time distance
forvalues i=1/3{
replace b=b_`i' if distance==-`i'
}
forvalues i=1/4{
replace b=b`i' if distance==`i'
}
forvalues i=1/3{
replace LB=b_`i'LB if distance==-`i'
}
forvalues i=1/4{
replace LB=b`i'LB if distance==`i'
}
forvalues i=1/3{
replace UB=b_`i'UB if distance==-`i'
}
forvalues i=1/4{
replace UB=b`i'UB if distance==`i'
}
keep distance b LB UB
duplicates drop distance,force
sort distance
replace b=-0.0826611 in 4
replace LB=-0.1522871 in 4
replace UB=-0.0130351 in 4
replace b=0 in 3
replace LB=0 in 3
replace UB=0 in 3
twoway(connected b distance, sort lcolor(black) mcolor(black) msymbol(o) cmissing(n))(rcap LB UB distance, lcolor(black)lpattern(dash) msize(medium)),ytitle(Coefficient of regression) ytitle(, size(medium))  yline(0, lwidth(vthin) lpattern(dash) lcolor(teal)) ylabel(, labsize(small) angle(horizontal) nogrid) xtitle(Relative time point) xtitle(, size(medium)) xline(0, lwidth(vthin) lpattern(dash) lcolor(teal))  xlabel(-3(1)4, labsize(small))  xmtick(-3(1)4, nolabels ticks)legend(off)graphregion(fcolor(white) lcolor(white) ifcolor(white) ilcolor(white))
**5.Excluding contemporaneous policy interference Table 3
use data.dta, clear
*(1)Carbon Emissions Trading Pilot Policy
reghdfe lnSO2 LCCP CETP lnAge lnSize Assdebt Fixasst lnKl gdptrend fditrend fintrend indtrend,absorb(year group) vce(clu group)
est store m11
reghdfe lnCOD LCCP CETP lnAge lnSize Assdebt Fixasst lnKl gdptrend fditrend fintrend indtrend,absorb(year group) vce(clu group)
est store m12
*(2)Innovation City Pilot Policy
reghdfe lnSO2 LCCP ICP lnAge lnSize Assdebt Fixasst lnKl gdptrend fditrend fintrend indtrend,absorb(year group) vce(clu group)
est store m13
reghdfe lnCOD LCCP ICP lnAge lnSize Assdebt Fixasst lnKl gdptrend fditrend fintrend indtrend,absorb(year group) vce(clu group)
est store m14
*(3)Air Pollution Prevention and Control Planning
reghdfe lnSO2 LCCP APCP lnAge lnSize Assdebt Fixasst lnKl gdptrend fditrend fintrend indtrend,absorb(year group) vce(clu group)
est store m15
reghdfe lnCOD LCCP APCP lnAge lnSize Assdebt Fixasst lnKl gdptrend fditrend fintrend indtrend,absorb(year group) vce(clu group)
est store m16
*(4)Special Emission Limits Policy for Air Pollution
reghdfe lnSO2 LCCP SELP lnAge lnSize Assdebt Fixasst lnKl gdptrend fditrend fintrend indtrend,absorb(year group) vce(clu group)
est store m17
reghdfe lnCOD LCCP SELP lnAge lnSize Assdebt Fixasst lnKl gdptrend fditrend fintrend indtrend,absorb(year group) vce(clu group)
est store m18
esttab m11 m12 m13 m14 m15 m16 m17 m18 using H2.rtf, ar2(%6.4f) compress nogaps replace star(* 0.1 ** 0.05 *** 0.01) b(%6.4f) se(%6.4f)
**6.PSM-DID Table 4
forvalues i=1998/2014{
use data.dta, clear
keep if year==`i'
set seed 20210415
gen tmp=runiform()
sort tmp
psmatch2 reform lnAge lnSize Assdebt Fixasst lnKl,out(lnSO2) logit neighbor(3) common ate
drop if _weight==.
save psmdid_`i'.dta,replace
}
use psmdid_1998,clear
forvalues i=1999/2014{
append using psmdid_`i'
}
reghdfe lnSO2 LCCP lnAge lnSize Assdebt Fixasst lnKl, a(year group) vce(cl group)	
est store m11
forvalues i=1998/2014{
use data.dta
keep if year==`i'
set seed 20210415
gen tmp=runiform()
sort tmp
psmatch2 reform lnAge lnSize Assdebt Fixasst lnKl, out(lnCOD) logit neighbor(3) common ate
drop if _weight==.
save psmdid_`i'.dta,replace
}
use psmdid_1998,clear
forvalues i=1999/2014{
append using psmdid_`i'
}
reghdfe lnCOD LCCP lnAge lnSize Assdebt Fixasst lnKl,a(year group) vce(cl group)
est store m12
esttab m11 m12 using H3.rtf, ar2(%6.4f) compress nogaps replace star(* 0.1 ** 0.05 *** 0.01) b(%6.4f) se(%6.4f)	
**7.Shrink tail processing Table 4
use data.dta, clear
winsor2 lnSO2 lnCOD lnAge lnSize Assdebt Fixasst lnKl gdptrend fditrend fintrend indtrend,replace cuts(1,99)
reghdfe lnSO2 LCCP lnAge lnSize Assdebt Fixasst lnKl gdptrend fditrend fintrend indtrend,absorb(year group) vce(clu group)
est store m11
reghdfe lnCOD LCCP lnAge lnSize Assdebt Fixasst lnKl gdptrend fditrend fintrend indtrend,absorb(year group) vce(clu group)
est store m12
esttab m11 m12 using H4.rtf, ar2(%6.4f) compress nogaps replace star(* 0.1 ** 0.05 *** 0.01) b(%6.4f) se(%6.4f)	
**8.Excluding the impact of high-polluting firms reallocate from LCCP regions to non-LCCP regions Table 4 
drop if pil_to_no==1
reghdfe lnSO2 LCCP lnAge lnSize Assdebt Fixasst lnKl gdptrend fditrend fintrend indtrend,absorb(year group) vce(clu group)
est store m11
reghdfe lnCOD LCCP lnAge lnSize Assdebt Fixasst lnKl gdptrend fditrend fintrend indtrend,absorb(year group) vce(clu group)
est store m12
esttab m11 m12 using H5.rtf, ar2(%6.4f) compress nogaps replace star(* 0.1 ** 0.05 *** 0.01) b(%6.4f) se(%6.4f)
**9.聚类到城市层面 Table 4 
use data.dta, clear
reghdfe lnSO2 LCCP lnAge lnSize Assdebt Fixasst lnKl gdptrend fditrend fintrend indtrend,absorb(year group) vce(clu city_code)
est store m11
reghdfe lnCOD LCCP lnAge lnSize Assdebt Fixasst lnKl gdptrend fditrend fintrend indtrend,absorb(year group) vce(clu city_code)
est store m12
esttab m11 m12 using H13.rtf, ar2(%6.4f) compress nogaps replace star(* 0.1 ** 0.05 *** 0.01) b(%6.4f) se(%6.4f)
**10.Impact mechanism analysis 
*(1)Front-end control Table 5
use data.dta, clear
gen SO2pro=ln(SO2pro1+1)
reghdfe SO2pro LCCP lnAge lnSize Assdebt Fixasst lnKl gdptrend fditrend fintrend indtrend,absorb(year group) vce(clu group)
est store m11
gen CODpro=ln(CODpro1+1)
reghdfe CODpro LCCP lnAge lnSize Assdebt Fixasst lnKl gdptrend fditrend fintrend indtrend,absorb(year group) vce(clu group)
est store m12
gen Patent=ln(total_invent+1)
reghdfe Patent LCCP lnAge lnSize Assdebt Fixasst lnKl gdptrend fditrend fintrend indtrend,absorb(year group) vce(clu group)
est store m13
reghdfe Ispatent LCCP lnAge lnSize Assdebt Fixasst lnKl gdptrend fditrend fintrend indtrend,absorb(year group) vce(clu group)
est store m14
gen Invent=ln(invent_patent+1)
reghdfe Invent LCCP lnAge lnSize Assdebt Fixasst lnKl gdptrend fditrend fintrend indtrend,absorb(year group) vce(clu group)
est store m15
reghdfe Isinvent LCCP lnAge lnSize Assdebt Fixasst lnKl gdptrend fditrend fintrend indtrend,absorb(year group) vce(clu group)
est store m16
gen grepatent=ln(green_patent+1)
reghdfe grepatent LCCP lnAge lnSize Assdebt Fixasst lnKl gdptrend fditrend fintrend indtrend,absorb(year group) vce(clu group)
est store m17
reghdfe Isgrepatent LCCP lnAge lnSize Assdebt Fixasst lnKl gdptrend fditrend fintrend indtrend,absorb(year group) vce(clu group)
est store m18
esttab m11 m12 m13 m14 m15 m16 m17 m18 using H6.rtf, ar2(%6.4f) compress nogaps replace star(* 0.1 ** 0.05 *** 0.01) b(%6.4f) se(%6.4f)
*(2)End-of-pipe treatment Table 6
use data.dta, clear
gen SO2remove=ln(SO2rem1+1)
reghdfe SO2remove LCCP lnAge lnSize Assdebt Fixasst lnKl gdptrend fditrend fintrend indtrend,absorb(year group) vce(clu group)
est store m11
gen CODremove=ln(CODrem1+1)
reghdfe CODremove LCCP lnAge lnSize Assdebt Fixasst lnKl gdptrend fditrend fintrend indtrend,absorb(year group) vce(clu group)
est store m12
esttab m11 m12 using H7.rtf, ar2(%6.4f) compress nogaps replace star(* 0.1 ** 0.05 *** 0.01) b(%6.4f) se(%6.4f)
*(3)Entry and exit effects Table 7
use data.dta, clear
gen cic1=substr(cic,1,2)
destring cic1,replace force
replace cic1=1 if(cic1==13|cic1==14|cic1==15|cic1==17|cic1==19|cic1==20|cic1==22|cic1==25|cic1==26)
replace cic1=1 if(cic1==27|cic1==28|cic1==29|cic1==31|cic1==32|cic1==33|cic1==6|cic1==8|cic1==5|cic1==9|cic1==10|cic1==45|cic1==7|cic1==11)
replace cic1=0 if(cic1==16|cic1==18|cic1==21|cic1==23|cic1==24|cic1==30|cic1==34|cic1==2)
replace cic1=0 if(cic1==35|cic1==36|cic1==37|cic1==39|cic1==40|cic1==41|cic1==42|cic1==44|cic1==46|cic1==43|cic1==72|cic1==74|cic1==83)
*Full sample
clogit inter LCCP lnAge lnSize Assdebt Fixasst lnKl gdptrend fditrend fintrend indtrend i.year,group(group)
est store m11
clogit exit LCCP lnAge lnSize Assdebt Fixasst lnKl gdptrend fditrend fintrend indtrend i.year,group(group)
est store m12
*Low pollution emission industries
drop if cic1==1
clogit inter LCCP lnAge lnSize Assdebt Fixasst lnKl gdptrend fditrend fintrend indtrend i.year,group(group)
est store m13
clogit exit LCCP lnAge lnSize Assdebt Fixasst lnKl gdptrend fditrend fintrend indtrend i.year,group(group)
est store m14
*High pollution emission industry
use data.dta, clear
gen cic1=substr(cic,1,2)
destring cic1,replace force
replace cic1=1 if(cic1==13|cic1==14|cic1==15|cic1==17|cic1==19|cic1==20|cic1==22|cic1==25|cic1==26)
replace cic1=1 if(cic1==27|cic1==28|cic1==29|cic1==31|cic1==32|cic1==33|cic1==6|cic1==8|cic1==5|cic1==9|cic1==10|cic1==45|cic1==7|cic1==11)
replace cic1=0 if(cic1==16|cic1==18|cic1==21|cic1==23|cic1==24|cic1==30|cic1==34|cic1==2)
replace cic1=0 if(cic1==35|cic1==36|cic1==37|cic1==39|cic1==40|cic1==41|cic1==42|cic1==44|cic1==46|cic1==43|cic1==72|cic1==74|cic1==83)
keep if cic1==1
clogit inter LCCP lnAge lnSize Assdebt Fixasst lnKl gdptrend fditrend fintrend indtrend i.year,group(group)
est store m15
clogit exit LCCP lnAge lnSize Assdebt Fixasst lnKl gdptrend fditrend fintrend indtrend i.year,group(group)
est store m16
esttab m11 m12 m13 m14 m15 m16 using H8.rtf, ar2(%6.4f) compress nogaps replace star(* 0.1 ** 0.05 *** 0.01) b(%6.4f) se(%6.4f)
**11.Heterogeneous analysis Table 8 
*(1)Heterogeneity in regional economic growth pressures
use data.dta, clear
destring goal1,replace force
bysort year province:egen medpresu=median(goal1)
gen Goal=.
replace Goal=0 if goal1>=medpresu
replace Goal=1 if Goal==.
rename Goal X
gen tre=X*LCCP
drop if year<=2001
drop if goal1==.
reghdfe lnSO2 LCCP X tre lnAge lnSize Assdebt Fixasst lnKl gdptrend fditrend fintrend indtrend,absorb(year group) vce(clu group)
est store m11
reghdfe lnCOD LCCP X tre lnAge lnSize Assdebt Fixasst lnKl gdptrend fditrend fintrend indtrend,absorb(year group) vce(clu group)
est store m12
esttab m11 m12 using H9.rtf, ar2(%6.4f) compress nogaps replace star(* 0.1 ** 0.05 *** 0.01) b(%6.4f) se(%6.4f)
*(2)Heterogeneity in regional environmental management pressure
use data.dta, clear
gen Envirpre=.
replace Envirpre=1 if(province=="上海市"|province=="南京市")
replace Envirpre=1 if(city=="扬州市"|city=="南通市")
replace Envirpre=1 if(city=="镇江市"|city=="常州市"|city=="无锡市"|city=="苏州市"|city=="泰州市")
replace Envirpre=1 if(city=="杭州市"|city=="宁波市"|city=="嘉兴市"|city=="潮州市"|city=="绍兴市")
replace Envirpre=1 if(county=="鹿城区"|county=="龙湾区"|county=="瓯海区"|county=="洞头区"|county=="瑞安市"|county=="永嘉县"|county=="苍南县")
replace Envirpre=1 if(city=="金华市"|city=="台州市"|city=="铜陵市"|city=="马鞍山市"|city=="黄山市"|city=="芜湖市")
replace Envirpre=1 if(county=="柯城区"|county=="衢江区"|county=="龙游县"|county=="衢县"|county=="江山市"|county=="婺城区"|county=="金东区"|county=="开发区"|county=="都市新区"|county=="婺城新区"|county=="金东新城区"|county=="金西开发区"|county=="双龙风景区"|county=="仙源湖风景区"|county=="多湖商务区")
replace Envirpre=1 if(city=="巢湖市"|city=="宣城市"|city=="福州市"|city=="厦门市"|city=="三明市"|city=="泉州市"|city=="漳州市"|city=="龙岩市")
replace  Envirpre=1 if(city=="南昌市"|city=="萍乡市"|city=="九江市"|city=="鹰潭市"|city=="抚州市"|city=="吉安市"|city=="赣州市"|city=="武汉市")
replace Envirpre=1 if(city=="黄石市")
replace Envirpre=1 if(city=="荆州市"|city=="宜昌市"|city=="荆门市"|city=="鄂州市")
replace Envirpre=1 if(city=="潜江市"|city=="咸宁市"|city=="长沙市"|city=="株洲市"|city=="湘潭市"|city=="衡阳市"|city=="岳阳市"|city=="常德市")
replace Envirpre=1 if(city=="张家界市"|city=="郴州市"|city=="益阳市"|city=="娄底市"|city=="怀化市"|city=="吉首市"|city=="广州市"|city=="深圳市"|city=="珠海市")
replace Envirpre=1 if(city=="汕头市"|city=="韶关市"|city=="惠州市"|city=="汕尾市"|city=="东莞市"|city=="中山市"|city=="江门市"|city=="佛山市"|city=="湛江市"|city=="肇庆市"|city=="云浮市"|city=="清远市"|city=="潮州市"|city=="揭阳市"|city=="南宁市"|city=="柳州市"|city=="桂林市"|city=="梧州市"|city=="玉林市"|city=="贵港市"|city=="柳州市"|city=="桂林市"|city=="贺州市"|city=="河池市")
replace Envirpre=1 if(county=="上林县"|county=="崇左县"|county=="宾阳县"|county=="横县")
replace Envirpre=1 if(city=="成都市"|city=="自贡市"|city=="攀枝花市"|city=="泸州市"|city=="德阳市"|city=="绵阳市"|city=="遂宁市"|city=="内江市"|city=="乐山市"|city=="南充市"|city=="宜宾市"|city=="广安市"|city=="眉山市"|city=="贵阳市"|city=="遵义市"|city=="安顺市"|city=="兴义市"|city=="凯里市"|city=="昆明市"|city=="曲靖市"|city=="玉溪市"|city=="昭通市"|city=="个旧市"|city=="开远市"|city=="楚雄市"|city=="都匀市")
replace Envirpre=1 if(county=="渝中区"|county=="江北区"|county=="沙坪坝区"|county=="南岸区"|county=="九龙坡区"|county=="大渡口区"|county=="渝北区"|county=="北碚区"|county=="巴南区"|county=="万盛区"|county=="双桥区"|county=="涪陵区"|county=="永川市"|county=="合川市"|county=="江津市"|county=="长寿县"|county=="荣昌县"|county=="大足县"|county=="綦江区"|county=="璧山县"|county=="铜梁县"|county=="潼南县")
replace Envirpre=1 if(county=="东城区"|county=="西城区"|county=="宣武区"|county=="崇文区"|county=="朝阳区"|county=="海淀区"|county=="丰台区"|county=="石景山区"|county=="门头沟区"|county=="通州区"|county=="房山区"|county=="昌平县"|county=="大兴县"|county=="河东区"|county=="河西区"|county=="河北区"|county=="南开区"|county=="红桥区"|county=="和平区")
replace Envirpre=1 if(city=="忻州市"|city=="榆次市"|city=="临汾市"|city=="运城市"|city=="新民市"|city=="石嘴山市"|city=="金昌市"|city=="白银市"|city=="张掖市")
replace Envirpre=1 if(county=="邯山区"|county=="丛台区"|county=="复兴区"|county=="峰峰矿区"|county=="肥乡区"|county=="永年区"|county=="武安市"|county=="信都区"|county=="襄都区"|county=="任泽区"|county=="南和区"|county=="南宫市"|county=="沙河市")
replace Envirpre=1 if(county=="竞秀区"|county=="莲池区"|county=="满城区"|county=="清苑区"|county=="徐水区"|county=="涿州市"|county=="定州市"|county=="涿州市"|county=="安国市"|county=="高碑店市")
replace Envirpre=1 if(county=="桥东区"|county=="桥西区"|county=="宣化区"|county=="下花园区"|county=="万全区"|county=="崇礼区")
replace Envirpre=1 if(county=="双桥区"|county=="双滦区"|county=="鹰手营子矿区")
replace Envirpre=1 if (county=="路南区"|county=="路北区"|county=="古冶区"|county=="开平区"|county=="丰南区"|county=="丰润区"|county=="曹妃甸区")
replace Envirpre=1 if(county=="桃城区"|county=="开发区"|county=="遵化市"|county=="丰南区")
replace Envirpre=1 if(county=="小店区"|county=="迎泽区"|county=="杏花岭区"|county=="尖草坪区"|county=="万柏林区"|county=="晋源区"|county=="平城区"|county=="云冈区"|county=="新荣区"|county=="云州区"|county=="城区"|county=="矿区"|county=="郊区"|county=="朔城区"|county=="平鲁区")
replace Envirpre=1 if(county=="回民区"|county=="玉泉区"|county=="新城区"|county=="赛罕区"|county=="昆都仑区"|county=="青山区"|county=="东河区"|county=="九原区"|county=="石拐区"|county=="海勃湾城区"|county=="乌达城区"|county=="海南城区"|county=="滨河西区"|county=="红山区"|county=="松山二区"|county=="和平区"|county=="沈河区"|county=="大东区"|county=="皇姑区"|county=="北关区"|county=="北市区"|county=="南市区|county=="皇姑区"|county=="铁西区"|county=="近郊区"|county=="于洪区"|county=="东陵区"|county=="苏家屯区"|county=="新民市"|county=="中山区"|county=="西岗区"|county=="沙河口区"|county=="甘井子区"|county=="旅顺口区"|county==金州区"|county=="高新技术产业园区"|county=="铁东区"|county=="铁西区"|county=="立山区"|county=="千山区"|county=="海城市"|county=="新抚区"|county=="望花区"|county=="东洲区"|county=="顺城区"|county=="平山区"|county=="明山区"|county=="溪湖区"|county=="南芬区")
replace Envirpre=1 if(county=="古塔区"|county=="凌河区"|county=="太和区"|county=="连山区"|county=="龙岗区"|county=="南票区"|county=="海州区"|county=="细河区"|county=="太平区"|county=="新邱区"|county=="清河门区"|county=="白塔区"|county=="文圣区"|county=="弓长岭区"|county=="太子河区"|county=="昌邑区"|county=="船营区"|county=="龙潭区"|county=="丰满区"|county=="舒兰市"|county=="蛟河市"|county=="桦甸区"|county=="铁西区"|county=="铁东区"|county=="双辽市"|county=="公主岭市"|county=="东昌区"|county=="二道江区"|county=="梅河口市"|county=="集安市"|county=="云龙区"|county=="鼓楼区"|county=="泉山区"|county=="贾汪区"|county=="铜山区"|county=="邳州市"|county=="新沂市")
replace Envirpre=1 if(county=="历下区"|county=="市中区"|county=="槐荫区"|county=="天桥区"|county=="历城区"|county=="章丘市"|county=="李沧区|county=="市南区"|county=="市北区"|county=="四方区"|county=="胶南市"|county=="胶州市"|county=="莱西市"|county=="张店区"|county=="淄川区"|county=="博山区"|county=="周村区"|county=="临淄区"|county=="市中区"|county=="薛城区"|county=="峄城区"|county=="台儿庄区"|county=="山亭区"|county=="奎文区"|county=="潍城区"|county=="寒亭区"|county=="坊子区"|county=="青州市"|county=="高密市"|county=="昌邑市"|county=="芝罘区"|county=="福山区"|county=="牟平区"|county=="莱山区"|county=="蓬莱区"|county=="莱阳市"|county=="莱州市"|county=="招远市"|county==海阳市")
replace Envirpre=1 if(county=="任城区"|county=="兖州区"|county=="曲阜市"|county=="邹城市"|county=="泰山区"|county=="岱岳区"|county=="新泰市"|county=="肥城市"|county=="莱芜市"|county=="德城区"|county=="乐陵市"|county=="禹城市"|county=="金水区"|county=="二七区"|county=="中原区"|county=="管城区"|county=="巩义市"|county=="惠济区"|county=="郑东新区"|county=="经开区"|county=="高新区"|county=="航空港区"|county=="老城区"|county=="西工区"|county=="瀍河回族区"|county=="涧西区"|county=="吉利区"|county=="洛龙区"|county=="偃师市"|county=="孟津县"|county=="解放区"|county=="中站区"|county=="马村区"|county=="山阳区"|county=="沁阳市"|county=="孟州市"|county=="修武县")
replace Envirpre=1 if(county=="温县"|county=="武陵县"|county=="博爱县"|county=="文峰区"|county=="北关区"|county=="殷都区"|county=="龙安区"|county=="林州市"|county=="滨区"|county=="陕州区")
replace Envirpre=1 if(county=="义马市"|county=="灵宝市"|county=="济源市"|county=="新城区"|county=="碑林区"|county=="莲湖区"|county=="雁塔区"|county=="灞桥区"|county=="未央区"|county=="阎良区"|county=="临潼区"|county=="长安区"|county=="高陵区"|county=="鄠邑区"|county=="王益区"|county=="印台区"|county=="耀州区"|county=="临渭区"|county=="高新区"|county=="经开区"|county=="华州区"|county=="华阴市"|county=="红古区"|county=="西固区"|county=="七里河区"|county=="安宁区"|county=="城关区"|county=="金川区"|county=="白银区"|county=="平川区")
replace Envirpre=1 if(city=="延吉市"|city=="商州市"|city=="张掖市")
replace Envirpre=1 if(county=="兴庆区"|county=="金凤区"|county=="西夏区"|county=="大武口区"|county=="惠农区"|county=="石炭井区"|county=="水磨沟区"|county=="沙依巴克区"|county=="天山区"|county=="新市区"|county=="米东区"|county=="头屯河区"|county=="东山区"|county=="达坂城区"|county=="上林县"|county=="崇左县"|county=="宾阳县"|county=="横县"|county=="合山市"|county=="来宾县"|county=="鹿寨县"|county=="灵川县"|county=="全州县"|county=="兴安县"|county=="荔浦县"|county=="永福县"|county=="贺州市"|county=="钟山县"|county=="河池市"|county=="宜州市")
replace Envirpre=0 if(county=="隆安县"|county=="马山县"|county=="上林县"|county=="融水县"|county=="三江县"|county=="龙胜县"|county=="德保县"|county=="靖西县"|county=="那坡县"|county=="凌云县"|county=="乐业县"|county=="田林县"|county=="西林县"|county=="环江县"|county=="巴马县"|county=="都安县"|county=="大化县"|county=="忻城县"|county=="金秀县"|county=="龙州县"|county=="天等县")
replace Envirpre=0 if Envirpre==.
rename Envirpre X
gen tre=X*LCCP
reghdfe lnSO2 LCCP X tre lnAge lnSize Assdebt Fixasst lnKl gdptrend fditrend fintrend indtrend,absorb(year group) vce(clu group)
est store m11
reghdfe lnCOD LCCP X tre lnAge lnSize Assdebt Fixasst lnKl gdptrend fditrend fintrend indtrend,absorb(year group) vce(clu group)
est store m12
esttab m11 m12 using H10.rtf, ar2(%6.4f) compress nogaps replace star(* 0.1 ** 0.05 *** 0.01) b(%6.4f) se(%6.4f)
*(3)Heterogeneity in firm ownership
use data.dta, clear
gen Soe=.
replace Soe=1 if type_reg=="国有企业"
replace Soe=1 if type_reg=="国有独资公司"
replace Soe=1 if type_reg=="国有与集体联营企业"
replace Soe=1 if type_reg=="国有联营企业"
replace Soe=1 if type_reg=="其他有限责任公司"&holding_status=="国有控股"
replace Soe=1 if type_reg=="股份有限公司"&holding_status=="国有控股"
replace Soe=0 if Soe==.
gen tre=Soe*LCCP
reghdfe lnSO2 LCCP Soe tre lnAge lnSize Assdebt Fixasst lnKl gdptrend fditrend fintrend indtrend,absorb(year group) vce(clu group)
est store m11
reghdfe lnCOD LCCP Soe tre lnAge lnSize Assdebt Fixasst lnKl gdptrend fditrend fintrend indtrend,absorb(year group) vce(clu group)
est store m12
esttab m11 m12 using H11.rtf, ar2(%6.4f) compress nogaps replace star(* 0.1 ** 0.05 *** 0.01) b(%6.4f) se(%6.4f)
*(4)Heterogeneity in firm size
use data.dta, clear
bysort year:egen med_pract=median(total_employ)
gen Size=.
replace Size=1 if total_employ>=med_pract
replace Size=0 if Size==.
gen tre=Size*LCCP
reghdfe lnSO2 LCCP Size tre lnAge lnSize Assdebt Fixasst lnKl gdptrend fditrend fintrend indtrend,absorb(year group) vce(clu group)
est store m11
reghdfe lnCOD LCCP Size tre lnAge lnSize Assdebt Fixasst lnKl gdptrend fditrend fintrend indtrend,absorb(year group) vce(clu group)
est store m12
esttab m11 m12 using H12.rtf, ar2(%6.4f) compress nogaps replace star(* 0.1 ** 0.05 *** 0.01) b(%6.4f) se(%6.4f)


